home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 May / EnigmA AMIGA RUN 07 (1996)(G.R. Edizioni)(IT)[!][issue 1996-05][EARSAN CD VI].iso / rubriche / host-cont / amountns.lha / AMountains / global.c < prev    next >
C/C++ Source or Header  |  1996-01-14  |  2KB  |  70 lines

  1. #include <m68881.h>
  2. #include <math.h>
  3. #include "crinkle.h"
  4. #include "paint.h"
  5.  
  6. #ifndef FALSE
  7. #    define FALSE    0
  8. #endif
  9. #ifndef TRUE
  10. #    define TRUE        (! FALSE)
  11. #endif
  12.  
  13. Fold    *top;
  14. int        levels;
  15. int        stop;
  16. int        smooth;
  17. int        cross;
  18. int        slope;
  19. int        snooze_time;
  20. int        n_col;
  21. int        band_size;
  22. int        request_clear    = FALSE;
  23. double    fdim;
  24. double    mix;
  25. double    midmix;
  26. Height    start;                            // starting value for the surface
  27. Height    mean            = 0.0;            // mean value of surface
  28. Height    varience;                        // rough estimate of the height of the range
  29. Height    shift;                            // offset from calcalt to artist coordinates
  30. Height    delta_shadow;                    // offset of shadow at each step
  31. double    stretch;                        // vertical stretch
  32. double    contour;
  33. double    ambient;                        // level of ambient light
  34. double    contrast;                        // contrast,
  35.                                         // increases or decreases effect of cosine rule
  36. double    vfract;                            // relative strength of vertical light relative
  37.                                         // to the main light source
  38. double    altitude;
  39. double    distance;
  40. double    phi;                            // angle of the light (vertical plane)
  41. double    alpha;                            // angle of the light (horizontal plane)
  42.                                         // must have -pi/4 < alpha < pi/4
  43. double    shadow_slip;
  44. double    shadow_register    = 0.0;
  45. double    cos_phi;
  46. double    sin_phi;
  47. double    tan_phi;
  48. double    x_fact;
  49. double    y_fact;
  50. Height    sealevel;
  51. Height    forceheight;
  52. int        width;                            // width of the landscape, (function of levels)
  53. int        seed;                            // zero means read the clock
  54.  
  55. /* -------------------------------------------------------------------- */
  56. /* viewport parameters                                                    */
  57. /* -------------------------------------------------------------------- */
  58.  
  59. int        height;                            // height of the screen
  60. double    vangle;                            // view angle 0 == horizontal
  61.                                         // increase to look down
  62. double    tan_vangle;                                     
  63. double    vscale;                            // rescale physical height by this amount.
  64. double    viewpos;                        // position of viewpoint
  65. double    viewheight;                        // height of viewpoint
  66. double    focal;                            // focal length, calc to preserve aspect ratio
  67.  
  68. Height    *shadow;                        // height of the shadows
  69. Height    *a_strip, *b_strip;                // the two most recent strips
  70.